﻿using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace QNLua.CommonData
{
	public enum DoActionType
	{
		OpenWindow = 1,
		CloseWindow,
		ShowTip,
		ToggleActive,
		ShowNode,
		HideNode,
		RotateNode,
		Share,
		OpenURL,
		Quit,
		QuitCrossServer,
		DestroyNode,
		StartRecharge,
		QuitGameSceneAction,
		OpenOrCloseWindow
	}

	public class QNActionOption
    {
		[JsonConverter(typeof(StringEnumConverter))]

		[JsonProperty("type")]
		public DoActionType Type { get; set; }

		[JsonProperty("param")]
		public string? Param { get; set; }

		[JsonProperty("params")]
		public string? Params { get; set; }

		[JsonProperty("num")]
		public double? Num { get; set; }

		[JsonProperty("name")]
		public string? Name { get; set; }

		[JsonProperty("onShowData")]
		public Dictionary<string, double>? OnShowData { get; set; }
		[JsonProperty("option")]
		public ActionConditionOption? Option { get; set; }
	}
}
